/**
 * @created June 7, 2004
 *
 * @modified March 8, 2007
 * @author jprieur
 */
package kernel;

public class DataTrajectoryPause extends DataTrajectory 
{
    private double _duration;
    public static final double DURATION_MIN = 0;
    public static final double DURATION_DEF = 0;

    /**
     * Constructor
     * @param duration duration of the pause
     */
    public DataTrajectoryPause(double duration) 
    {
	setDuration(duration);
    }

    public boolean setDuration(double duration)
    {
	boolean done = false;
	if(checkBounds(UNDEFINED, DURATION_MIN, duration)){
	    _duration = DURATION_DEF;
	}else{
		_duration = duration;
	    done = true;
	}
	return done;	
    }

    public double getDuration()
    {
	return _duration;
    }

    public String toString()
    {
	return("Pause : duration = "+_duration/1000+"s.\n");
    }

}
